﻿/**
 * $HeadURL: https://smartcollector.googlecode.com/svn/branches/Srcs/SmartCollector.WebUI/SmartCollector.WebUI/Controllers/ItemController.cs $
 * $Author: chithanh12 $
 * $Date: 2011-04-09 00:11:43 +0700 (Sat, 09 Apr 2011) $
 * $Rev: 60 $
 **/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartCollector.WebUI.Helpers
{
    public static class IEnumerableExtensions
    {
        #region IEnumerable<T> extensions

        public static IPagedList<T> ToPagedList<T>(this IEnumerable<T> source, int pageIndex, int pageSize)
        {
            return new PaginatedList<T>(source, pageIndex, pageSize);
        }

        public static IPagedList<T> ToPagedList<T>(this IEnumerable<T> source, int pageIndex, int pageSize, int totalCount)
        {
            return new PaginatedList<T>(source, pageIndex, pageSize, totalCount);
        }

        #endregion
    }
}
